<%--
   costAccountingEntry
   Copyright (c) 2013 ISPERP
   Version : 1.0.0
 --%>
<%@ tag language="java" pageEncoding="UTF-8"
	deferredSyntaxAllowedAsLiteral="false" trimDirectiveWhitespaces="true"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>


<%@ attribute name="relationId" required="true" type="java.lang.String"
	description="relationId"%>
<%@ attribute name="projectId" required="true" type="java.lang.String"
	description="projectId"%>
<%@ attribute name="projectIdControl" required="false"
	type="java.lang.String" description="projectIdControl"%>

<%@ attribute name="readonly" required="false" type="java.lang.Boolean"
	description="readonly"%>

<isperp:grid
	url="project/costAccountingEntry/listByRelationId?relationId=${relationId}"
	gridId="accountingEntryGrid" cusFormatterActions="${!readonly }"
	height="auto" showPager="false" rownumbers="false"
	showSearchbar="false" showToolbar="${!readonly }"
	cusEditUrl="project/costAccountingEntry/edit?projectId=${projectId}&relationId=${relationId}"
	ondbClickRowEvent="if(${!readonly }){accountingEntryGrid.edit(rowid);}"
	cusDeleteUrl="project/costAccountingEntry/delete">

	<jsp:attribute name="toolbar">
	<isperp:toolbar id="iconToolbar">
		<isperp:button text="添加成本项" icon="icon-plus"
			onclick="accountingEntryGrid.create();"></isperp:button>
	</isperp:toolbar>
	</jsp:attribute>
	<jsp:body>
	<isperp:column name="id" title="id" hidden="true"></isperp:column>
	<isperp:column name="cost_subject_name" title="科目" width="90">
	</isperp:column>
	<isperp:column name="amount" title="金额（元）" width="60">
	</isperp:column>
	<isperp:column name="handler_name" title="经手人" width="60">
	</isperp:column>
	<isperp:column name="occurrence_date" title="发生日期" width="100">
	</isperp:column>
	<isperp:column name="memo" title="备注" width="120">
	</isperp:column>
</jsp:body>
</isperp:grid>
